﻿<%@ Page Title="" Language="C#" MasterPageFile="~/common/Admin.master" AutoEventWireup="true" CodeFile="fd_applicant.aspx.cs" Inherits="fd_applicant" %>

<asp:Content ID="Content3" ContentPlaceHolderID="leftMenu" Runat="Server">
<ul>
   <li><a href="<%= Page.ResolveUrl("~/product/saving/admin/saving_applicant.aspx")%>">
        Saving Account</a></li>
   
    <li><a href="<%= Page.ResolveUrl("~/product/fixed_deposit/admin/fd_applicant.aspx")%>">
        Fixed Deposit Account</a></li>
                   
    </ul>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="content" Runat="Server">
     <h1>List of all curent fixed deposit account applicants</h1>
    
     
   
    <p>
        <asp:GridView ID="gvApplicant" runat="server" AutoGenerateColumns="False" 
            BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" 
            CellPadding="3" CellSpacing="2" DataKeyNames="accountNo" 
            DataSourceID="applicantDataSource">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
                <asp:BoundField DataField="custID" HeaderText="Customer ID" 
                    SortExpression="custID" />
                <asp:BoundField DataField="accountNo" HeaderText="Account No" ReadOnly="True" 
                    SortExpression="accountNo" />
                <asp:BoundField DataField="accountType" HeaderText="AccountType" 
                    SortExpression="accountType" />
                <asp:BoundField DataField="DepositAmount" HeaderText="Deposit Amount" 
                    SortExpression="DepositAmount" />
                <asp:BoundField DataField="certNo" HeaderText="Certificate No" 
                    SortExpression="certNo" />
            </Columns>
            <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
            <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
            <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
            <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
            <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#FFF1D4" />
            <SortedAscendingHeaderStyle BackColor="#B95C30" />
            <SortedDescendingCellStyle BackColor="#F1E5CE" />
            <SortedDescendingHeaderStyle BackColor="#93451F" />
        </asp:GridView>
    </p>
     <p>
         <asp:SqlDataSource ID="applicantDataSource" runat="server" 
             ConflictDetection="CompareAllValues" 
             ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
             DeleteCommand="DELETE FROM [FIXED_DEPOSIT] WHERE [accountNo] = @original_accountNo AND (([custID] = @original_custID) OR ([custID] IS NULL AND @original_custID IS NULL)) AND (([accountType] = @original_accountType) OR ([accountType] IS NULL AND @original_accountType IS NULL)) AND (([DepositAmount] = @original_DepositAmount) OR ([DepositAmount] IS NULL AND @original_DepositAmount IS NULL)) AND (([certNo] = @original_certNo) OR ([certNo] IS NULL AND @original_certNo IS NULL))" 
             InsertCommand="INSERT INTO [FIXED_DEPOSIT] ([custID], [accountNo], [accountType], [DepositAmount], [certNo]) VALUES (@custID, @accountNo, @accountType, @DepositAmount, @certNo)" 
             OldValuesParameterFormatString="original_{0}" 
             SelectCommand="SELECT [custID], [accountNo], [accountType], [DepositAmount], [certNo] FROM [FIXED_DEPOSIT]" 
             UpdateCommand="UPDATE [FIXED_DEPOSIT] SET [custID] = @custID, [accountType] = @accountType, [DepositAmount] = @DepositAmount, [certNo] = @certNo WHERE [accountNo] = @original_accountNo AND (([custID] = @original_custID) OR ([custID] IS NULL AND @original_custID IS NULL)) AND (([accountType] = @original_accountType) OR ([accountType] IS NULL AND @original_accountType IS NULL)) AND (([DepositAmount] = @original_DepositAmount) OR ([DepositAmount] IS NULL AND @original_DepositAmount IS NULL)) AND (([certNo] = @original_certNo) OR ([certNo] IS NULL AND @original_certNo IS NULL))">
             <DeleteParameters>
                 <asp:Parameter Name="original_accountNo" Type="String" />
                 <asp:Parameter Name="original_custID" Type="String" />
                 <asp:Parameter Name="original_accountType" Type="String" />
                 <asp:Parameter Name="original_DepositAmount" Type="Decimal" />
                 <asp:Parameter Name="original_certNo" Type="String" />
             </DeleteParameters>
             <InsertParameters>
                 <asp:Parameter Name="custID" Type="String" />
                 <asp:Parameter Name="accountNo" Type="String" />
                 <asp:Parameter Name="accountType" Type="String" />
                 <asp:Parameter Name="DepositAmount" Type="Decimal" />
                 <asp:Parameter Name="certNo" Type="String" />
             </InsertParameters>
             <UpdateParameters>
                 <asp:Parameter Name="custID" Type="String" />
                 <asp:Parameter Name="accountType" Type="String" />
                 <asp:Parameter Name="DepositAmount" Type="Decimal" />
                 <asp:Parameter Name="certNo" Type="String" />
                 <asp:Parameter Name="original_accountNo" Type="String" />
                 <asp:Parameter Name="original_custID" Type="String" />
                 <asp:Parameter Name="original_accountType" Type="String" />
                 <asp:Parameter Name="original_DepositAmount" Type="Decimal" />
                 <asp:Parameter Name="original_certNo" Type="String" />
             </UpdateParameters>
         </asp:SqlDataSource>
    </p>
    <p>
    </p>
    
</asp:Content>

